package o;

import android.content.Context;
import android.view.MenuItem;
import android.view.SubMenu;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.d;

@RestrictTo({d.LIBRARY_GROUP})
public final class arb extends bd {
    public arb(Context context) {
        super(context);
    }

    public SubMenu addSubMenu(int i, int i2, int i3, CharSequence charSequence) {
        throw new UnsupportedOperationException("BottomNavigationView does not support submenus");
    }

    protected MenuItem ˏ(int i, int i2, int i3, CharSequence charSequence) {
        if (size() + 1 > 5) {
            throw new IllegalArgumentException("Maximum number of items supported by BottomNavigationView is 5. Limit can be checked with BottomNavigationView#getMaxItemCount()");
        }
        ॱॱ();
        MenuItem ˏ = super.ˏ(i, i2, i3, charSequence);
        if (ˏ instanceof bj) {
            ((bj) ˏ).ॱ(true);
        }
        ʼ();
        return ˏ;
    }
}
